<% controllers = ['settings', 'dashboard'] %>
<% dropdown_class = (controllers & controller_path.split('/')).empty? ? '' : 'active' %>
<li class="nav-item dropdown account-settings text-left <%= dropdown_class %>">
  <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown">
    <span><%= current_user.email %></span>
    <b class="caret"></b>
  </a>
  <div class="dropdown-menu">
    <% if is_admin? %>
      <a class="dropdown-item" href="<%= admin_dashboard_path %>">
        <i class="fa fa-tachometer-alt"></i>
        <span><%= t('header.admin') %></span>
      </a>
    <% end %>
    <a class="dropdown-item" href="<%= main_app.signout_path %>">
      <i class="fa fa-sign-out-alt"></i>
      <span><%= t('header.signout') %></span>
    </a>
  </div>
</li>
